from pyecharts.charts import Line
from pyecharts.options import TitleOpts, LegendOpts, ToolboxOpts, VisualMapOpts
line = Line()
line.add_xaxis(["0.05", "0.10", "0.15", "0.20", "0.25", "0.30", "0.35", "0.40", "0.50", "0.60", "0.70", "0.80"])
line.add_yaxis("吸光度随摩尔分数的变化", [0.095, 0.225, 0.351, 0.447, 0.551, 0.533, 0.436, 0.365, 0.290, 0.208, 0.130])
# 列表上下列依次对应
line.set_global_opts(
    title_opts=TitleOpts(title="摩尔分数", pos_left="center", pos_bottom="1%"),
    legend_opts=LegendOpts(is_show=True),
    toolbox_opts=ToolboxOpts(is_show=True),
    visualmap_opts=VisualMapOpts(is_show=True),
)
line.render()
